using System.Collections.Generic;

namespace SharePointUtilitiesForDevelopers.Repository
{
    /// <summary>
    /// Defines the interface for a repository for working with webs.
    /// </summary>
    public interface ISharePointWebRepository
    {
        /// <summary>
        /// Gets the web content types.
        /// </summary>
        /// <param name="siteUrl">The site URL.</param>
        /// <returns>A list of content types in the web.</returns>
        IEnumerable<SharePointContentType> GetWebContentTypes(string siteUrl);

        /// <summary>
        /// Gets the web lists.
        /// </summary>
        /// <param name="siteUrl">The site URL.</param>
        /// <returns>A list of lists in the web.</returns>
        IEnumerable<SharePointList> GetWebLists(string siteUrl);

        /// <summary>
        /// Gets the web site columns.
        /// </summary>
        /// <param name="siteUrl">The site URL.</param>
        /// <returns>A list of site columns in the web.</returns>
        IEnumerable<SharePointField> GetWebSiteColumns(string siteUrl);

        /// <summary>
        /// Gets the web site user list.
        /// </summary>
        /// <param name="siteUrl">The site URL.</param>
        /// <returns>The site user list for the specified site.</returns>
        SharePointList GetWebSiteUserInfoList(string siteUrl);

        /// <summary>
        /// Loads the web lists.
        /// </summary>
        /// <param name="web">The web.</param>
        void LoadWebLists(SharePointWeb web);

        /// <summary>
        /// Loads the web content types.
        /// </summary>
        /// <param name="web">The web.</param>
        void LoadWebContentTypes(SharePointWeb web);

        /// <summary>
        /// Loads the web site columns.
        /// </summary>
        /// <param name="web">The web.</param>
        void LoadWebSiteColumns(SharePointWeb web);

        /// <summary>
        /// Loads the web site user list.
        /// </summary>
        /// <param name="web">The web.</param>
        void LoadWebSiteUserInfoList(SharePointWeb web);

        /// <summary>
        /// Gets the web.
        /// </summary>
        /// <param name="siteUrl">The web URL.</param>
        /// <param name="options">Load options.</param>
        /// <returns>A <see cref="SharePointWeb"/>.</returns>
        SharePointWeb GetWeb(string siteUrl, SharePointWebLoadOptions options);
    }
}